Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bindings for arm64 Linux (aarch64-unknown-linux-gnu) #133

Merged
merged 2 commits into from
Feb 23, 2023

Conversation

eitsupi
Copy link
Contributor

@eitsupi eitsupi commented Feb 22, 2023

@eitsupi

This comment was marked as resolved.

@eitsupi
Copy link
Contributor Author

eitsupi commented Feb 22, 2023

It seems working on Ubuntu 22.04 arm64.

> remotes::install_github("extendr/helloextendr#17")
Downloading GitHub repo eitsupi/helloextendr@test-linux-arm64
── R CMD build ─────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file/tmp/RtmpiBVZo4/remotes1732d6289de/eitsupi-helloextendr-06d0b33/DESCRIPTION’ (710ms)
─  preparinghelloextendr:checking DESCRIPTION meta-information ...cleaning srcchecking for LF line-endings in source and make files and shell scriptschecking for empty or unneeded directories
   OmittedLazyDatafrom DESCRIPTIONbuildinghelloextendr_0.1.0.tar.gzInstalling package into/usr/local/lib/R/site-library’
(aslibis unspecified)
* installing *source* packagehelloextendr...
** using staged installation
** libs
rm -Rf helloextendr.so ./rust/target/release/libhelloextendr.a entrypoint.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c entrypoint.c -o entrypoint.o
# In some environments, ~/.cargo/bin might not be included in PATH, so we need
# to set it here to ensure cargo can be invoked. It is appended to PATH and
# therefore is only used if cargo is absent from the user's PATH.
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin" && \
        cargo build --lib --release --manifest-path=./rust/Cargo.toml --target-dir ./rust/target
    Updating git repository `https://github.com/eitsupi/extendr`
   Compiling proc-macro2 v1.0.49
   Compiling libR-sys v0.3.0 (https://github.com/eitsupi/libR-sys?rev=de5bdb80bce26879ceb23b7cc66c51421666f1e6#de5bdb80)
   Compiling quote v1.0.23
   Compiling unicode-ident v1.0.6
   Compiling syn v1.0.107
   Compiling paste v1.0.11
   Compiling extendr-engine v0.3.1 (https://github.com/eitsupi/extendr?rev=f35068ea0db234d59c2b944d7b54914e92c51e4b#f35068ea)
   Compiling extendr-api v0.3.1 (https://github.com/eitsupi/extendr?rev=f35068ea0db234d59c2b944d7b54914e92c51e4b#f35068ea)
   Compiling lazy_static v1.4.0
   Compiling extendr-macros v0.3.1 (https://github.com/eitsupi/extendr?rev=f35068ea0db234d59c2b944d7b54914e92c51e4b#f35068ea)
   Compiling helloextendr v0.3.0 (/tmp/Rtmpzl74NI/R.INSTALL4ce15016057/helloextendr/src/rust)
    Finished release [optimized] target(s) in 1m 10s
gcc -shared -L/usr/local/lib/R/lib -L/usr/local/lib -o helloextendr.so entrypoint.o -L./rust/target/release -lhelloextendr -L/usr/local/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/00LOCK-helloextendr/00new/helloextendr/libs
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (helloextendr)

> sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: aarch64-unknown-linux-gnu (64-bit)
Running under: Ubuntu 22.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/aarch64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/aarch64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
 [1] processx_3.8.0    compiler_4.2.2    R6_2.5.1          rprojroot_2.0.3   cli_3.6.0         prettyunits_1.1.1
 [7] tools_4.2.2       withr_2.5.0       curl_5.0.0        crayon_1.5.2      remotes_2.4.2     desc_1.4.2
[13] callr_3.7.3       ps_1.7.2          pkgbuild_1.4.0

@eitsupi eitsupi marked this pull request as ready for review February 22, 2023 16:32
@eitsupi eitsupi changed the title Add Linux aarch64 targets Add bindings for arm64 Linux (aarch64-unknown-linux-gnu) Feb 22, 2023
Copy link
Contributor

@yutannihilation yutannihilation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is more complicated than I expected. Great work!

My main concern was the compilation time, but it seems fine. Let's merge.

https://github.com/eitsupi/libR-sys/actions/runs/4244029363/usage

@yutannihilation yutannihilation merged commit 4f5eb99 into extendr:master Feb 23, 2023
@eitsupi
Copy link
Contributor Author

eitsupi commented Feb 23, 2023

Thanks for merging this!
Perhaps we should also create a symlink?
https://github.com/extendr/libR-sys/blob/4f5eb99c82af338695e0f213eb0c52f0419c9cad/bindings/bindings-linux-x86_64.rs

@eitsupi eitsupi deleted the generated_bindings branch February 23, 2023 10:55
@yutannihilation
Copy link
Contributor

Ah, yes. Sorry, it was my oversight... Would you mind creating a pull request to create the symlink?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants